package test.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description:
 * @author: JC
 * @date: 2022/6/1 8:35
 */
public class UserDao {
    private static Map<String, String> hashMap = new HashMap<>();

    public void initDataMethod(){
        System.out.println("执行：init-method");
        hashMap.put("10001", "小水");
        hashMap.put("10002", "八水");
        hashMap.put("10003", "阿水");
    }
    public void destroyDataMethod(){
        System.out.println("执行：UserDao.destroy-method");
        hashMap.clear();
    }


    public String queryUserName(String uId) {
        return hashMap.get(uId);
    }

}
